package com.zh.common.exception;

import com.zh.common.constant.ExCodeConstant;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 自定义基础异常
 */
@Component
@RequiredArgsConstructor

public class BaseException extends RuntimeException{
    private int code;
    public BaseException(String message, int code) {
        super(message);
        this.code = code;
    }
    public BaseException(String message) {
        this(message, ExCodeConstant.BEX_CODE);
    }
}
